<template>
  <div>
    <MMessageA
      :show="showMessage"
      message="show属性控制显示隐藏"
      :offset="200"
      :on-close="handleOnCloseClick"
    >
    </MMessageA>
    <MButton type="primary" @click="showMessage = !showMessage"
      >MMessageA 单独使用</MButton
    >
  </div>
</template>
<script lang="ts">
import { messageA } from "/@/m-ui";
import { defineComponent, ref } from "vue";
export default defineComponent({
  components: {},
  setup() {
    const showMessage = ref(false);
    const handleBaseClick = () => {
      messageA("基本使用基本使用基本使用基本使用");
    };
    const handleOnCloseClick = () => {
      messageA({
        message: "看下控制台有调用关闭回调",
        onClose: () => {
          console.log("关了..");
        },
      });
    };
    return {
      showMessage,
      handleBaseClick,
      handleOnCloseClick,
    };
  },
});
</script>
